<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<style>
.activeline {background: #D4ECC8 !important;}
.borderblack {
    position:relative;
	height: 300px;
	border:1px solid black;
	width: 80%;
}
.CodeMirror-scroll {
    /*height: 100%;/**/
    overflow-y: auto;
    overflow-x: auto;
    width: 100%;
}
</style>
<div>${bean.name}</div>
<div>${bean.lines}</div>
<div>${bean.currentLine}</div>
<div>${bean.tid}</div>
<div class="borderblack">
	<textarea id="${bean.tid}" name="code">${doc}</textarea>
</div>
<script type="text/javascript">
var _ELcurrentLine = ${bean.currentLine};
var _ELtid = ${bean.tid};
</script>
<script type="text/javascript">
	var editor = CodeMirror.fromTextArea(document.getElementById("${bean.tid}"), {
		lineNumbers : true,
		readOnly : true,
		onCursorActivity: function() {
			editor.setLineClass(hlLine, null);
		    hlLine = editor.setLineClass(editor.getCursor().line, "activeline");
		},
		mode : "text/x-java"
	});
	var hlLine = editor.setLineClass(_ELcurrentLine, "activeline");
</script>
